package com.javasea.web.httpclient.forest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 *@ClassName DemoController
 *@Description TODO
 *@Author longxiaonan@163.com
 *@Date 2021/8/26 0026 17:53
 */
@RestController
public class DemoController {

    @Autowired
    private MyClient myClient;

    @GetMapping("test1")
    public Map test1() {
        Map result = myClient.getLocation("124.730329","31.463683");
        System.out.println(result);
        return result;
    }

    /** 会跳转到 百度首页 */
    @GetMapping("test2")
    public String test2(){
        return myClient.simpleRequest();
    }

}
